package top.coori;

/**
 * @Auther: KafuuCoori
 * @Date: 2022/6/4 - 06 - 04 - 9:52
 * @Description: top.coori
 * @version: 1.0
 */

public class Son extends Father{
    // 属性
    private int b;

    // 方法
    public int getB() {
        return b;
    }

    public void setB(int b) {
        this.b = b;
    }

    // 重写父类的自定方法
    @Override
    public String method() {
        return super.method() + "\nB is " + b;
    }

    // 构造器
    public Son() {
    }

    public Son(int a, int b) {
        super(a);
        this.b = b;
    }
}
